
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
    <meta charset="utf-8">
    <title><?php echo get('sitename');?>管理登录 - Powered by CmsEasy</title>
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="{$base_url}/favicon.ico" type="image/x-icon" />
    <meta name="description" content="">
    <meta name="author" content="">
    <!-- CSS -->
<!--    <link rel="stylesheet" href="{$base_url}/login/css/reset.css">-->
    <link rel="stylesheet" href="{$skin_path}/login/css/supersized.css">
    <link rel="stylesheet" href="{$skin_path}/login/css/style.css">
    <script src="http://apps.bdimg.com/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>
<body oncontextmenu="return false">
<div class="page-container">
    <h1>Login</h1>

    <?php
    if(!get('submit')) flash();
    if(!get('submit') || hasflash()) {
    ?>

    <form name="loginform" action="<?php echo uri();?>" method="post" onsubmit="return Dcheck();">
        <input type="hidden" name="submit" value="提交">
        <div>
            <input type="text" name="username" class="username" placeholder="Username" autocomplete="off"/>
<!--            <input name="username" class="username" type="text" id="username" value="{get('username')}" placeholder="Username" autocomplete="off" tabindex="1" />-->
        </div>
        <div>
<!--            <input type="password" name="password" class="password" placeholder="Password" oncontextmenu="return false" onpaste="return false" />-->
            <input name="password" type="password" id="password" value="<?php //echo $password;?>" placeholder="Password" oncontextmenu="return false" onpaste="return false" tabindex="2" />
        </div>
<!--        <button id="submit" type="button">Sign in</button>-->







<!--        <ul>-->
<!--            <form name="loginform" action="--><?php //echo uri();?><!--" method="post" onsubmit="return Dcheck();">-->
<!--                <li><input name="username" type="text" id="username" id="username" value="{get('username')}" tabindex="1" /></li>-->
<!--                <li><input name="password" type="password" id="password" value="--><?php ////echo $password;?><!--" tabindex="2" /></li>-->


                {if config::get('mobilechk_enable') && config::get('mobilechk_admin')}
<!--                <style type="text/css">-->
<!--                    #tel {width:290px;-->
<!--                        margin:10px 0px;-->
<!--                        height:28px;-->
<!--                        line-height:28px;-->
<!--                        padding:0px 10px 0px 50px;-->
<!--                        border:1px solid #ccc;-->
<!--                        border-radius: 5px;}-->
<!--                    #select {width:290px;}-->
<!---->
<!--                    #mobilenum { float:left; width:140px; border:1px solid #ccc; height:26px; line-height:26px; padding:0px 10px;border-radius: 5px;}-->
<!--                    #btm_sendMobileCode { float:right; width:180px; border:1px solid #ccc; height:28px; line-height:28px; padding:0px 10px;border-radius: 5px;}-->
<!--                </style>-->

                <script src="{$base_url}/js/mobilechk.js"></script>
                <input placeholder="{lang(tel)}" type='text' id="tel"  name="tel" value="" tabindex="3" class="input" />
                <div class="blank20"></div>
                <input id="btm_sendMobileCode" onclick="sendMobileCode('{url('tool/smscode')}',$('#tel'));" type="button" value="{lang(send_cell_phone_verification_code)}" />
                <input type='text' placeholder="{lang(please_enter_the_phone_verification_code)}" id="mobilenum" name="mobilenum" />
                <div class="blank20"></div>
                {/if}
                {if config::get('verifycode') == 1}
                <div><input type='text' id="verify"  tabindex="3"  name="verify" />{verify()}</div>
                {/if}
                {if config::get('verifycode') == 2}
                <div style="position:absolute;margin-top:5px">
                    <div id="verifycode_embed"></div>
                    <script src="http://api.geetest.com/get.php"></script>
                    <script>
                        var loadGeetest = function(config) {
                            window.gt_captcha_obj = new window.Geetest({
                                gt : config.gt,
                                challenge : config.challenge,
                                product : 'float',
                                offline : !config.success
                            });
                            gt_captcha_obj.appendTo("#verifycode_embed");
                        };

                        $.ajax({
                                url : '{url('tool/geetest',0)}',
                            type : "get",
                            dataType : 'JSON',
                            success : function(result) {
                            console.log("111"+result);
                            loadGeetest(result);
//                            $("#ts").html(result);
//                             is_show();
                        }
                        })
                    </script>
                </div>
                {/if}
                <div class="submit">
                <input type="submit" name="submit" value="Sign in" class="button" />
<!--<span class="fr">-->
<!--<a href="http://www.cmseasy.cn/plus/show_134.html" target="_blank">找回密码？</a> <a href="http://chm.cmseasy.cn/" target="_blank" class="help">帮助</a>-->
<!--</span>-->
                </div>
            </form>





        <?php
    }
    if(get('submit')) {
    if(hasflash()) {
        echo '<div style="clear:both;margin:50px 0px;text-align:center;color:red;font-size:16px;font-weight:bold;">';
        echo flash();
    } else { ?>
    <div style="margin:50px 0px;padding-top:5px; text-align:center;font-size:16px;font-weight:bold;">
        登陆成功！

        <meta http-equiv="refresh" content="2;url={$admin_url}&site=<?php echo front::get('site')?>">
        <?php
        }
        echo '</div>';
        }
        ?>

        <script type="text/javascript">
            function ResumeError()
            {
                return true;
            }
            window.onerror = ResumeError;
            document.loginform.username.focus();
        </script>









    <div class="connect">
        <p>For You and Planet Blue.</p>
        <!--<p style="margin-top:20px;">如果只是遇见，不能停留，不如不遇见。</p>-->
        <p>&copy; &nbsp;<a title="{get('sitename')}" href="{$base_url}/">{get('sitename')}</a> All Rights Reserved. &nbsp;&nbsp;Powered by <a href="http://www.jiyuanshe.com" title="集元社" target="_blank">JYScms</a></p>
    </div>
</div>
<div class="alert" style="display:none">
    <!--<h2>消息</h2>-->
    <div class="alert_con">
        <p id="ts"></p>
        <a class="close btn">×</a>
    </div>
</div>





<!--    <div class="logo">-->
<!--        <a title="{get(sitename)}" href="{$base_url}/"></a>-->
<!--    </div>-->










<!-- Javascript -->
<script type="text/javascript" src="{$skin_path}/login/js/supersized.3.2.7.min.js"></script>
<script type="text/javascript" src="{$skin_path}/login/js/supersized-init.js"></script>
<script>
    $(".btn").click(function(){
        is_hide();
    })
    var u = $("input[name=username]");
    var p = $("input[name=password]");
//    $("#submit").live('click',function(){
//        if(u.val() == '' || p.val() =='')
//        {
//            $("#ts").html("用户名或密码不能为空~");
//            is_show();
//            return false;
//        }
//        else{
//            var reg = /^[0-9A-Za-z]+$/;
//            if(!reg.exec(u.val()))
//            {
//                $("#ts").html("用户名错误");
//                is_show();
//                return false;
//            }
//        }
//    });
//    window.onload = function()
//    {
//        $(".connect p").eq(0).animate({"left":"0%"}, 600);
//        $(".connect p").eq(1).animate({"left":"0%"}, 400);
//    };
    function is_hide(){ $(".alert").fadeOut(400); }
    function is_show(){ $(".alert").fadeIn(400);}
</script>
</body>

</html>

